//获取应用实例
import network from '../../utils/network.js';
const app = getApp()

Page({
 
    /**
     * 页面的初始数据
     */
    data: {
     member_id:0,
     detail:[],
    },
 
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (e) {
     var that = this;
     that.setData({
       member_id:e.id
     });
      that.getMeberDetail("正在加载中");
    },

  getMeberDetail:function(message){
    var that = this; 
    var data = {
      member_id: that.data.member_id, 
    };
    network.requestLoading('http://jbc.com/api/Member/memberDetail', data, message, function (res) { 
      if (res.code > 0) {
        that.setData({
          detail:res.data
        });
      } else {
        wx.showToast({
          title: res.msg,
        })
      }
    }, function (res) {
      wx.showToast({
        title: '加载数据失败',
      })

    })
  }
 
})
